/*
 * 文  件  名：ThreadPoolExecutor.java
 * 版         权：Copyright©2013-2016 FuRongBao All Rights Reserved
 * 描         述：
 * 修  改  人：mq.zhang
 * 修改时间：2016年9月28日
 */
package com.mqzhang.common.jmx;

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.weakref.jmx.Managed;

/**
 * @author mq.zhang
 * @version V1.0 2016年9月28日
 */
@JmxEbean
public class ThreadPoolExecutor extends ThreadPoolTaskExecutor implements ThreadPoolExecutorEbean {
    private static final long serialVersionUID = -3138222067921806883L;

    /**
     * {@inheritDoc}
     */
    @Override
    @Managed
    public void setCorePoolSize(int corePoolSize) {
        super.setCorePoolSize(corePoolSize);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    @Managed
    public int getCorePoolSize() {
        return super.getCorePoolSize();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    @Managed
    public void setMaxPoolSize(int maxPoolSize) {
        super.setMaxPoolSize(maxPoolSize);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    @Managed
    public int getMaxPoolSize() {
        return super.getMaxPoolSize();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    @Managed
    public void setKeepAliveSeconds(int keepAliveSeconds) {
        super.setKeepAliveSeconds(keepAliveSeconds);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    @Managed
    public int getKeepAliveSeconds() {
        return super.getKeepAliveSeconds();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    @Managed
    public int getPoolSize() {
        return super.getPoolSize();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    @Managed
    public int getActiveCount() {
        return super.getActiveCount();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    @Managed
    public int getBlockQueueSize() {
        return super.getThreadPoolExecutor().getQueue().size();
    }

}
